export const ADD_ACTION="ADD";
export const SPLICE_ACTION="SPLICE";
export const SHIFT_ACTION="SHIFT";
export const  UNSHIFT_ACTION="UNSHIFT";
export function addFn(value) {
    return function(dispatch,getState){
        return dispatch({
            type:ADD_ACTION,
            value
        })
    }
}
export function spliceFn(index,value) {
    return {
        type:SPLICE_ACTION,
        index,
        value
    }
}
export function shiftFn() {
    return {
        type:SPLICE_ACTION,
        index:0 
    }
}
export function unshiftFn(value) {
    return {
        type:UNSHIFT_ACTION,
        value
    }
}
/*
function numFn(state=10,action={type:'',value:''}){
    switch (action.type) {
        case "ADD":
            return ++state;
            break;
        case "SUB":
                return --state;
                break;
        default:
            return action.value
            break;
    }
}
export default numFn;
*/